<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

<ui:define name="body">

    <h:form id="SendMailForm">

        <rich:panel>
            <f:facet name="header">sendMail</f:facet>

            <s:decorate id="fromNameField" template="/layout/edit.xhtml">
                <ui:define name="label">From (name)</ui:define>
                <h:inputText id="fromName" required="true" value="#{SendMail.fromName}"/>
            </s:decorate>
            
            <s:decorate id="fromAddressField" template="/layout/edit.xhtml">
                <ui:define name="label">From (address)</ui:define>
                <h:inputText id="fromAddress" required="true" value="#{SendMail.fromAddress}"/>
            </s:decorate>
            
            <s:decorate id="replyToAddressField" template="/layout/edit.xhtml">
                <ui:define name="label">Reply to</ui:define>
                <h:inputText id="replyToAddress" required="true" value="#{SendMail.replyToAddress}"/>
            </s:decorate>
            
            <s:decorate id="toNameField" template="/layout/edit.xhtml">
                <ui:define name="label">To (name)</ui:define>
                <h:inputText id="toName" required="true" value="#{SendMail.toName}"/>
            </s:decorate>
            
            <s:decorate id="toAddressField" template="/layout/edit.xhtml">
                <ui:define name="label">To (address)</ui:define>
                <h:inputText id="toAddress" required="true" value="#{SendMail.toAddress}"/>
            </s:decorate>
            
            <s:decorate id="subjectField" template="/layout/edit.xhtml">
                <ui:define name="label">Subject</ui:define>
                <h:inputText id="subject" required="true" value="#{SendMail.subject}"/>
            </s:decorate>
            
            <s:decorate id="bodyField" template="/layout/edit.xhtml">
                <ui:define name="label">Body</ui:define>
                <h:inputTextarea id="body" required="true" value="#{SendMail.body}"/>
            </s:decorate>

            <div style="clear:both"/>

        </rich:panel>

        <div class="actionButtons">
            <h:commandButton id="send" value="send"
                    action="#{SendMail.send}"/>
        </div>

    </h:form>

</ui:define>

</ui:composition>
